package com.white.bean;

import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * -- ⑮　关注：关注ID、被关注用户ID、关注用户ID、关注时间。
 * create table follow(
 * followId int primary key AUTO_INCREMENT comment "关注ID",
 * beFollowUserId int comment "被关注用户ID",
 * foreign key(beFollowUserId) REFERENCES user(userId) on delete cascade on update cascade,
 * followUserId int comment "关注用户ID",
 * foreign key(followUserId) REFERENCES user(userId) on delete cascade on update cascade,
 * createTime TIMESTAMP not null default CURRENT_TIMESTAMP comment "关注时间，默认当前时间戳"
 * );
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Follow  implements Serializable {
    @TableId("followId")
    private Long followId;
    private Long beFollowUserId, followUserId;
    private String createTime;

    public Follow(Long beFollowUserId, Long followUserId) {
        this.beFollowUserId = beFollowUserId;
        this.followUserId = followUserId;
    }
}
